﻿using LazyPlugins.DeclarativeAddinCreator;

namespace LazyPlugins.AutoAttacher.CustomActions
{
    #region Normal attach

    [AddinButtonCaption("Attach Managed", "Attach Managed")]
    [AddinButtonIconName("man.png")]
    internal class AttachManagedAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).OptimisticManaged();
        }

        public override void OnDisconnect()
        {

        }
    }

    [AddinButtonCaption("Attach Native", "Attach Native")]
    [AddinButtonIconName("nat.png")]
    internal class AttachNativeAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).OptimisticNative();
        }

        public override void OnDisconnect()
        {

        }
    }

    [AddinButtonCaption("Attach Managed And Native", "Attach Managed And Native")]
    [AddinButtonIconName("man_nat.png")]
    internal class AttachNativeAndManagedAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).OptimisticNativeAndManaged();
        }

        public override void OnDisconnect()
        {

        }
    }


    #endregion

    #region Wait and attach
    [AddinButtonCaption("Wait And Attach Managed", "Wait And Attach Managed")]
    [AddinButtonIconName("wait_man.png")]
    internal class WaitAndAttachManagedAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).PessimisticManaged();
        }
    
        public override void OnDisconnect()
        {

        }
    }

    [AddinButtonCaption("Wait And Attach Native", "AWait And ttach Native")]
    [AddinButtonIconName("wait_nat.png")]
    internal class WaitAndAttachNativeAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).PessimisticNative();
        }

        public override void OnDisconnect()
        {

        }
    }

    [AddinButtonCaption("Wait And Attach Managed And Native", "Wait And Attach Managed And Native")]
    [AddinButtonIconName("wait_man_nat.png")]
    internal class WaitAndAttachNativeAndManagedAction : AddinActionBase
    {
        public override void Execute()
        {
            ActionsHelper.GetInstance(ApplicationObject).PessimisticNativeAndManaged();
        }

        public override void OnDisconnect()
        {

        }
    }

    #endregion
}
